package ${package.Parent}.api;

import javax.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.web.common.api.config.ServiceInstanceName;
import ${package.Entity}.${entity};
import ${package.Entity}.${entity}Entity;
import com.web.common.result.R;

/**
 * <p>
 * ${table.comment!}
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
 @FeignClient(name = ServiceInstanceName.SERVICE_BASIC_NAME, contextId = "${entity?uncap_first}Api", path = "/basic/${entity?uncap_first}")
 public interface ${entity}Api {
 	
 	/**
 	 * 按照条件查询数据列表
	 * @param condition 查询条件
	 *
	 * @author ${author}
	 * @since ${date}
	 */
 	@PostMapping(path = "/list")
	@ResponseBody
 	R<IPage<${entity}Entity>> getList(@RequestBody ${entity}Entity condition);
 	
 	/**
 	 * 保存数据信息
	 * @param ${entity?uncap_first} 数据信息
	 *
	 * @author ${author}
	 * @since ${date}
	 */
 	@PostMapping(path = "/save")
	@ResponseBody
 	R<Object> saveInfo(@Valid @RequestBody ${entity} ${entity?uncap_first});
 	
 	/**
 	 * 更新数据信息
	 * @param ${entity?uncap_first} 数据信息
	 *
	 * @author ${author}
	 * @since ${date}
	 */
 	@PostMapping(path = "/update")
	@ResponseBody
 	R<Object> updateInfo(@Valid @RequestBody ${entity} ${entity?uncap_first});
 	
 	/**
 	 * 删除数据信息
	 * @param ${entity?uncap_first} 数据信息
	 *
	 * @author ${author}
	 * @since ${date}
	 */
 	@PostMapping(path = "/delete")
	@ResponseBody
 	R<Object> deleteInfo(@RequestBody ${entity} ${entity?uncap_first});
 }
 
